FROM tomcat:8.5-alpine
ENV DUBBO dubbo-admin-2.6.0
WORKDIR $CATALINA_HOME/webapps/
RUN apk add --no-cache unzip && rm -rf ROOT
COPY target/${DUBBO}.war .
RUN  unzip  ${DUBBO}.war -d ROOT && rm -f ${DUBBO}.war
WORKDIR /
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x entrypoint.sh
EXPOSE 8080
CMD ["sh", "/entrypoint.sh"]